import net from "./net"

let request = (index_url="",data={})=>{
    let http_url = net.http_url+index_url;
    let param = {};
    param = {...param,...data};
    return new Promise((res,rjs)=>{
        wx.request({
          url: 'url',
          method:'POST',
          data:param,
          url:http_url,
          success:(result)=>{
              res(result);
          },
          fail:(result)=>{
              wx.showModal({
                title: '提示',
                content: result.errMsg,
                showCancel:false,
              })
          }
        })
    });
}

export default{
    request,
}